package com.yzpc.service;


import com.yzpc.entity.News;
import com.yzpc.mapper.NewsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NewsService {
    @Autowired
    NewsMapper newsMapper;

    public List<News> getNews(){
        return newsMapper.findAll();
    }
}
